package parser;
import renderernode.*;
import java.util.HashMap;

public class HTMLConstants {
	private HashMap<String, TreeNode> constants;
	
	public HTMLConstants() {
		constants = new HashMap<String, TreeNode>();
		buildConstants();
	}
	
	private void buildConstants() {
		constants.put("<b>", new BoldNode());
		
	}

	public boolean isOpeningTag(String tag)
	{
		
	}
	
	public TreeNode getInstance(String tag) throws Exception
	{
		TreeNode node = constants.get(tag);
		if (node == null) {
			throw new Exception("tag not found");
		}
		return node.clone();
	}
}
